package com.xy.shardingjdbcdemo.controller;

import com.xy.shardingjdbcdemo.domain.Order;
import com.xy.shardingjdbcdemo.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 谢阳
 * @version 1.0
 * @date 2023/12/25 15:46
 * @description
 */

@RestController
@RequestMapping("/order")
@RequiredArgsConstructor
public class OrderController {

    private final OrderService OrderService;

    @GetMapping("/list")
    public List<Order> list() {
        return OrderService.list();
    }

}
